import { createRouter, createWebHashHistory, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

export const routeList = [
  {
    path: '/',
    redirect: '/fleetFightViewNew'
  },
  {
    path: '/home',
    name: 'home',
    component: HomeView
  },
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (About.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import('../views/AboutView.vue')
  },
  {
    path: '/fleetFightView',
    name: 'fleetfightview',
    // route level code-splitting
    // this generates a separate chunk (About.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import('../views/FleetFightView/index.vue')
  },
  {
    path: '/fleetFightViewNew',
    name: 'fleetfightviewnew',
    // route level code-splitting
    // this generates a separate chunk (About.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import('../views/FleetFightViewNew/index.vue')
  }
]

const router = createRouter({
  history: createWebHashHistory('/lagrangefleetconfigtool.github.io/'), // 这个path前缀要和github仓库上面的配置保持一致
  routes: routeList
})

export default router
